unit UfrmReportTemplate;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls, RzPanel, RzShellDialogs;

type
  TfrmReportTemplate = class(TForm)
    lbl1: TLabel;
    edt1: TEdit;
    lbl2: TLabel;
    edt2: TEdit;
    RzGroupBox1: TRzGroupBox;
    Button1: TButton;
    Button2: TButton;
    Button3: TButton;
    OpenDialog: TRzOpenDialog;
    lbl3: TLabel;
    procedure Button1Click(Sender: TObject);
    procedure Button3Click(Sender: TObject);
    procedure FormShow(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
     fform:string;
     Freportname:string;
     Ftemplatepath:string;
  public
     property form:string write FForm;
     property  reportname:string read Freportname;
     property templatepath:string  read Ftemplatepath;
  end;

var
  frmReportTemplate: TfrmReportTemplate;

implementation

{$R *.dfm}

procedure TfrmReportTemplate.Button1Click(Sender: TObject);
begin
   if  OpenDialog.Execute  then
   begin
        Ftemplatepath:=OpenDialog.FileName;
        lbl3.Caption:=Ftemplatepath;
   end;  
end;

procedure TfrmReportTemplate.Button3Click(Sender: TObject);
begin
   Close;
end;

procedure TfrmReportTemplate.FormShow(Sender: TObject);
begin
   edt2.Text:=fform;
end;

procedure TfrmReportTemplate.Button2Click(Sender: TObject);
begin
   Freportname:=Trim(edt1.Text);
   Close;
end;

end.
